package com.situ.edu.service.impl;

import com.situ.edu.dao.IStudentHisDao;
import com.situ.edu.dao.impl.StudentHisDaoImpl;
import com.situ.edu.pojo.query.CourseQuery;
import com.situ.edu.pojo.vo.CourseVO;
import com.situ.edu.service.IStudentHisService;
import com.situ.edu.util.PageInfo;

import java.util.List;

public class StudentHisServiceImpl implements IStudentHisService {
    private IStudentHisDao studentHisDao = new StudentHisDaoImpl();

    @Override
    public PageInfo selectByPage(CourseQuery courseQuery, String name, int password) {

        List<CourseVO> list = studentHisDao.selectByPage(courseQuery,name,password);
        int totalCount = studentHisDao.selectTotalCount(courseQuery,name,password);

        return PageInfo.ok(totalCount,list);
    }

    /*@Override
    public PageInfo selectByPage(CourseQuery courseQuery) {
        List<CourseVO> list = studentHisDao.selectByPage(courseQuery);
        int totalCount = studentHisDao.selectTotalCount(courseQuery);

        return PageInfo.ok(totalCount,list);
    }*/
}
